package com.tlm.consumer;

import com.tlm.consumer.proxy.FeignProxy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerFeignController {
    @Autowired
    private FeignProxy feignProxy;
    @GetMapping("testFeign")
    public String testFeign(){
        String hello = feignProxy.testProvider("hello");
        return hello;
    }
    @GetMapping("testFeign2")
    public UserVo testFeign2(){
        UserVo userVo = new UserVo();
        userVo.setName("张三");
        UserVo userVo1 = feignProxy.testProviderPost(userVo);
        return userVo1;
    }
}
